﻿namespace ProjectIndieFarm
{
    public class ChallengeGroupAdditional
    {
        public static void Setup(IChallengeSystem system)
        {
            system.Add(new GenericChallenge()
    .SetChallengeName("拥有2000金币")
    .OnCheckFinish(_ => Global.Coins.Value >= 2000)
    .OnFinish(self =>
    {
        Global.Coins.Value += 400;
        self.SendMessageWithReward(400);
    }));
            system.Add(new GenericChallenge()
                .SetChallengeName("累计收获100个土豆")
                .OnCheckFinish(_ => ChallengeSystem.HarvestedCountPotato >= 100)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 400;
                    self.SendMessageWithReward(400);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("累计收获100个胡萝卜")
                .OnCheckFinish(_ => ChallengeSystem.HarvestedCountCarrot >= 100)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 400;
                    self.SendMessageWithReward(400);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("累计收获100个西红柿")
                .OnCheckFinish(_ => ChallengeSystem.HarvestedCountTomato >= 100)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 400;
                    self.SendMessageWithReward(400);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("累计收获80个豆角")
                .OnCheckFinish(_ => ChallengeSystem.HarvestedCountBeans >= 80)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 400;
                    self.SendMessageWithReward(400);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("累计收获60个南瓜")
                .OnCheckFinish(_ => ChallengeSystem.HarvestedCountPumpkin >= 60)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 400;
                    self.SendMessageWithReward(400);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("拥有50个土豆")
                .OnCheckFinish(_ => ChallengeSystem.ItemCountPotato >= 50)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 500;
                    self.SendMessageWithReward(500);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("拥有50个胡萝卜")
                .OnCheckFinish(_ => ChallengeSystem.ItemCountCarrot >= 50)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 500;
                    self.SendMessageWithReward(500);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("拥有50个西红柿")
                .OnCheckFinish(_ => ChallengeSystem.ItemCountTomato >= 50)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 500;
                    self.SendMessageWithReward(500);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("拥有40个豆角")
                .OnCheckFinish(_ => ChallengeSystem.ItemCountBeans >= 40)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 500;
                    self.SendMessageWithReward(500);
                }));
            system.Add(new GenericChallenge()
                .SetChallengeName("拥有30个南瓜")
                .OnCheckFinish(_ => ChallengeSystem.ItemCountPumpkin >= 30)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 500;
                    self.SendMessageWithReward(500);
                }));
        }
    }
}
